package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class ParenthesizedGroupingColumnReferenceList implements OrdinaryGroupingSet {

    private int beginIndex;
    private int endIndex;
    private List<GroupingColumnReference> groupingColumnReferenceList;

    public ParenthesizedGroupingColumnReferenceList(int beginIndex,
                                                    int endIndex,
                                                    List<GroupingColumnReference> groupingColumnReferenceList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.groupingColumnReferenceList = groupingColumnReferenceList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return groupingColumnReferenceList.size();
    }

    public GroupingColumnReference get(int index) {
        return groupingColumnReferenceList.get(index);
    }

}
